<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head th:replace="decorator :: common_header(~{::'title/text()'},~{::customHead})">
	<title>api 用户管理</title>

	<!--/*/ <th:block th:fragment="customHead" > /*/-->

	<link rel="stylesheet" type="text/css"
	      href="lib/adminLTE/plugins/datatable/media/css/dataTables.bootstrap.min.css"/>

	<link rel="stylesheet" type="text/css"
	      href="lib/adminLTE/plugins/datatable/extensions/Buttons/css/buttons.dataTables.min.css"/>
	<link rel="stylesheet" type="text/css"
	      href="lib/adminLTE/plugins/datatable/extensions/Buttons/css/buttons.bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css"
	      href="lib/adminLTE/plugins/datatable/extensions/Select/css/select.dataTables.min.css"/>
	<link rel="stylesheet" type="text/css"
	      href="lib/adminLTE/plugins/datatable/extensions/Select/css/select.bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css"
	      href="lib/adminLTE/plugins/dualListbox/bootstrap-duallistbox.min.css"/>
	<link rel="stylesheet" type="text/css"
	      href="lib/dialog/bootstrap-dialog.min.css"/>

	<style type="text/css">
		select[name="permitList_helper2"] option.not-selected-item {
			color: blue;
		}

		select[name="permitList_helper1"] option.selected-item {
			color: blue;
		}
	</style>
	<!--/*/ </th:block > /*/-->
</head>
<body th:replace="decorator :: common_body(~{::mainBody},~{::tailScript})">

<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="mainBody" >  /*/-->

<div class="box box-primary search-box">
	<div class="box-header with-border">
		<h3 class="box-title">api 用户搜索</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
			</button>
		</div>
		<!-- /.box-tools -->
	</div>
	<!-- /.box-header -->
	<div class="box-body">
		<form class="search-form" action="security/staff/findApiUser">
			<input type="text" style="display: none"/>
			<div class="row">
				<div class="col-md-4"></div>
				<div class="col-md-4">
					<div class="row">
						<div class="col-md-2"></div>
						<div class="col-md-8">
							<div class="input-group input-group-sm">
								<input type="text" maxlength="30" class="form-control search-key" name="appKey" placeholder="输入AppKey">
								<span class="input-group-btn">
                                <button type="button" class="btn btn-primary btn-flat search-btn">Go</button>
                                </span>
							</div>
							<!-- /input-group -->
						</div>
						<div class="col-md-2"></div>
					</div>
				</div>
				<div class="col-md-4"></div>
			</div>
		</form>
	</div>
	<!-- /.box-body -->
</div>
<!-- /.box -->
<div class="box box-primary table-box hidden">
	<div class="box-header with-border">
		<h3 class="box-title">api 用户管理</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
			</button>
		</div>
		<!-- /.box-tools -->
	</div>
	<!-- /.box-header -->
	<div class="box-body">
		<table class="table table-bordered table-hover data-view" width="100%"
		>
			<thead>
			<tr>
				<th class="text-center text-nowrap">序号</th>
				<th class="text-center text-nowrap">ID</th>
				<th class="text-center text-nowrap">名称</th>
				<th class="text-center text-nowrap">公钥</th>

				<th class="text-center text-nowrap">创建时间</th>
				<th class="text-center text-nowrap">更新时间</th>
				<th class="text-center text-nowrap">版本</th>
				<th class="text-center text-nowrap">可见</th>
			</tr>
			</thead>
			<tbody></tbody>
			<tfoot>
			<tr>
				<th class="text-center text-nowrap">序号</th>
				<th class="text-center text-nowrap">ID</th>
				<th class="text-center text-nowrap">名称</th>
				<th class="text-center text-nowrap">公钥</th>

				<th class="text-center text-nowrap">创建时间</th>
				<th class="text-center text-nowrap">更新时间</th>
				<th class="text-center text-nowrap">版本</th>
				<th class="text-center text-nowrap">可见</th>
			</tr>
			</tfoot>
		</table>
	</div>
	<!-- /.box-body -->
</div>
<!-- /.box -->
<div class="modal fade edit-dialog add" role="dialog" aria-labelledby="编辑对话框">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
						aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">api 用户添加</h4>
			</div>
			<div class="modal-body">
				<form action="security/staff/addApiUser" class="form-edit add">
					<input type="text" style="display: none"/>
					<div class="form-group">
						<label class="control-label" for="app-key-add-editor"><i class="fa"></i>AppKey</label>
						<input id="app-key-add-editor" type="text" maxlength="32" required
						       class="form-control editor"
						       name="appKey" placeholder="appKey">
						<span class="help-block"></span>
					</div>
					<div class="form-group">
						<label class="control-label" for="public-key-add-editor"><i class="fa"></i>公钥</label>
						<textarea id="public-key-add-editor" maxlength="600" required class="form-control editor"
						          name="publicKey" placeholder="公钥" rows="8" cols="64"></textarea>
						<span class="help-block"></span>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-primary submit">保存
				</button>
			</div>
		</div>
	</div>
</div>

<div class="modal fade edit-dialog update" role="dialog" aria-labelledby="编辑对话框">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
						aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">api 用户信息修改</h4>
			</div>
			<div class="modal-body">
				<form action="security/staff/editApiUser" class="form-edit update">
					<input type="text" style="display: none"/>
					<input id="id-editor" type="hidden" name="id" class="editor"/>
					<div class="form-group">
						<label class="control-label" for="public-key-editor"><i class="fa"></i>公钥</label>
						<textarea id="public-key-editor" maxlength="600" required class="form-control editor"
						          name="publicKey" placeholder="公钥" rows="8" cols="64"></textarea>
						<span class="help-block"></span>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-primary submit">保存
				</button>
			</div>
		</div>
	</div>
</div>

<div class="modal fade public-key detail"  tabindex="-1" role="dialog" >
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" >公钥显示</h4>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<textarea  class="form-control display detail" readonly rows="8" cols="64"></textarea>
					<span class="help-block"></span>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>

<div class="modal fade http-permit duallist-box"  role="dialog" aria-labelledby="编辑对话框">
	<div class="modal-dialog modal-lg" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
						aria-hidden="true">&times;</span></button>
				<h4 class="modal-title"><span class="title"></span>
					<span class="message text-center" style="padding-left : 5px"></span>
				</h4>
			</div>
			<div class="modal-body">
				<form id="apiUserPermitForm" action="security/staff/editApiUser" class="form-edit grant"
				      data-find-action="security/staff/findHttpPermitFor">
					<input type="text" style="display: none"/>
					<input id="idEditorForGrant" type="hidden" name="id" class="editor"/>
					<input id="updatePermitTag" type="hidden" name="updatePermits" value="true" class="editor"/>
					<div class="form-group">
						<select multiple="multiple" class="form-control editor http-permit" name="appHttpPermitIds"
						        size="18" ></select>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default cancel" data-dismiss="modal">关闭</button>
				<button  type="button" class="btn btn-primary submit" form="apiUserPermitForm">保存
					<i class="fa"></i></button>
			</div>
		</div>
	</div>
</div>

<!--/*/ </th:block > /*/-->

<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="tailScript" > /*/-->
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/media/js/jquery.dataTables.min.js"
></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/media/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Buttons/js/dataTables.buttons.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Buttons/js/buttons.bootstrap.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Buttons/js/buttons.html5.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Select/js/dataTables.select.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/dualListbox/jquery.bootstrap-duallistbox.min.js"></script>
<script type="text/javascript"
        src="lib/dialog/bootstrap-dialog.min.js"></script>


<!-- 自定义脚本开始 -->
<script type="text/javascript" src="js/util/commonUtils.js"></script>
<script type="text/javascript" src="js/security/sysApiUser.js"></script>


<!--/*/ </th:block>  /*/-->
</body>
</html>